home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-12-07 | 3.1 KB | 132 lines | [TEXT/R*ch] |
-
- <:set form <:read_form>>
-
- <!-- authorization first -->
- <:set admin <:use_settings "/.admin/pass">>
- <:ifequal env["REMOTE_PASSWORD"] admin[env["REMOTE_USER"]]>
- <:set ok 1>
- <:else>
- <:set ok 0>
- <:request_credentials "SITE_ADMIN">
- <:/ifequal>
-
-
-
- <:set counters <:use_settings "/.admin/counters">>
-
- <:require counters["counter admin"]><:else>
- <:set counters["counter admin"] 0>
- <:/require>
-
- <!-- form data
- <:foreach name value form>
- <:echo name " = " value>
- <:/foreach>
- -->
-
- <html>
- <head>
- <link rel=stylesheet type="text/css" HREF="faadmin.css">
- <title>Flex-Able: Admin: Counters</title>
- </head>
- <body>
-
-
- <:ifequal ok 1>
-
- <!-- make changes to our data -->
- <:require form["$delete"]>
- <:foreach index value form["$delete"]>
- <:set counters[value]>
- <:/foreach>
- <:/require>
-
- <:require form["$newcounter"]>
- <:set counters[<:omit form["$newcounter"] "$">] <:new "INTG" form["$newvalue"]>>
- <:/require>
-
- <:foreach name value form>
- <:ifempty <:substring name "$">>
- <:set counters[name] <:new "INTG" value>>
- <:/ifempty>
- <:/foreach>
-
- <:require form["$checkpoint"]>
- <:set counters["$checkpoint"] form["$checkpoint"]>
- <:else>
- <:ifempty counters["$checkpoint"]>
- <:set counters["$checkpoint"] "20">
- <:/ifempty>
- <:/require>
-
- <DIV CLASS="topic">Counter Administration</DIV>
- <p><br>
- <p><br>
-
-
- <form action=count.able method=post>
- <table bgcolor="#e0e0e0" border=1>
- <tr>
- <th></th>
- <th>Counter Name</th>
- <th>Current Value</th>
- <th>Delete</th>
- </tr>
- <:foreach name value counters><:ifempty <:substring name "$">>
- <tr>
- <td></td>
- <td><:echo name></td>
- <td><:echo value></td>
- <td><input type=checkbox name="$delete" value="<:echo name>"></td>
- </tr>
- <:/ifempty><:/foreach>
- <tr>
- <th>New Counter</th>
- <td><input type=text name="$newcounter" value="" size=20></td>
- <td><input type=text name="$newvalue" value="" size=7></td>
- <td>n/a</td>
- </tr>
- </table>
- Save counters every <input type=text name="$checkpoint" size=3 value="<:echo counters["$checkpoint"]>"> minutes<P>
-
- <input type=submit value="Submit"> <input type=reset value="Clear">
- </form></ul>
-
- <h3>Using Counters</h3>
-
- To use a counter, insert the following line near the beginning of your page:<P>
- <blockquote>
- <:set counters <:use_settings "/.admin/counters">>
- </blockquote>
-
- Where you want the counter to appear, use one of the following insertion commands:<P>
-
- <TABLE CLASS="tablestyle1">
- <tr>
- <th align=left>Counter Name</th>
- <th align=right>Insertion Command</th>
- <th align=right>Value</th>
- <:foreach index value counters>
- <:ifequal "INTG" <:type_of value>>
- <tr>
- <td align=left><:echo index></td>
- <td align=right><:count counters["<:echo index>"]></td>
- <td align=right><:echo value></td>
- </tr><:/ifequal><:/foreach>
- </TABLE>
- <P>
-
-
- <:else>
-
- <DIV CLASS="topic">You do not have permission to view or change the counters.</DIV>
-
- <:/ifequal>
-
-
- This page has been viewed <:count counters["counter admin"]> times. <a href="count.able">Refresh</a>
- <hr>
- <A HREF="default.html" CLASS="back">back to Admin Home</A>
- </body>
- </html>
-